require 'mime/types'

class Group < ActiveRecord::Base
  belongs_to :category, :dependent => :destroy
  has_many :crews, :dependent => :destroy
  has_many :members ,:through => :crews, :dependent => :destroy
  has_many :avatars, :as => :avatarable, :dependent => :destroy
  
  JOIN = [["所有人可以加入",1],["需要身份验证",2],["需要回答指定问题",3]]
  POST = [["所有人可以发贴",1],["仅会员可以发贴",2],["仅管理员可以发贴",3]]

  def self.per_page
    10
  end

  #default_scope :conditions => ['verified = 1']
  named_scope :verified, :conditions => ['verified = 0'], :order => ""
  named_scope :hot

end
